/*
 * Copyright 2010-2013 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.sampledata;

import cef.pui.pob.Builder;
import coalescent.cef.pui.pob.Builders_Coa;
import coalescent.data.K69Data;
import commons.nb.data.DNData_FileBased;

import java.util.Properties;

/**
 * {@code DNData_FileBased} for model data {@code K69Data}.
 */
public class K69DataDNDataFileBased extends DNData_FileBased<K69Data> {

    public K69DataDNDataFileBased(final String displayName, final String shortDescription,
                                  final String URL) {
        super(displayName, shortDescription, URL, "coalescent/sampledata/K69Data_16.png");
    }

    @Override
    protected Builder<K69Data> of_Builder(String file_URL) {

        final Properties props = new Properties();

        props.setProperty("coalescent.builder.K69Data.url", "k69data:xml//" + file_URL);

        return Builders_Coa.of_Data_K69_File(props, null);
    }

    @Override
    public Class<K69Data> getBuilderValueType() {
        return K69Data.class;
    }
}
